<?php $this->renderPartial('/part/event', array('event'=>$event,'isDisplayButtons'=>true));?>
<hr />
<div class="div div-plain row">
	<?php echo $event->content?>
</div>

<?php if(count($relations)>0):?>
<div class='div row'>
	<hr />
	<h3>参加这个活动的有:</h3>
	<br />

	<?php 
	foreach ($relations as $relation){
		$image = CHtml::image(Utils::getImageUrlById("avatar", "thumbnail", $relation->member->id));
		$link = CHtml::link($image,array("event/list","username"=>$relation->member->username));
		echo "<div class='span1'>$link</div>";
	}
	?>
</div>

<?php if(Yii::app()->user->id == $event->member_id):?>
<div class='div'>
	<hr />
	<h3>参与者详细信息:</h3>
	<br />
	<table class='table table-striped'>
		<tr>
			<td>名称</td>
			<td>性别</td>
			<td>邮箱</td>
			<td>电话</td>
		</tr>
		<?php 
		foreach ($relations as $relation){
			$member =  $relation->member;
			$link = CHtml::link($member->title,array("event/list","username"=>$relation->member->username),array("target"=>"_blank"));
			echo "<tr>
			<td>$link</td>
			<td>$member->gender</td>
			<td>$member->email</td>
			<td>$member->phone</td>
			</tr>";
		}
		?>
	</table>
	<?php echo CHtml::link("保存为Excel",array("event/users","id"=>$event->id,"username"=>$_GET['username']),array('target'=>"_blank","class"=>"btn btn-warning"))?>
</div>
<?php endif;?>

<?php endif;?>

<hr />
<?php $this->widget('widgets.AlbumGrid', array('album_id'=>$event->album_id,'album_title'=>$event->title));?>

<div class='div'>
	<!-- UY BEGIN -->
	<div id="uyan_frame"></div>
	<script type="text/javascript" id="UYScript"
		src="http://uyan.cc/js/iframe.js?UYUserId=2894" async=""></script>
	<!-- UY END -->
</div>
